[gail] Clean the code to check the redundan object on the show watcher
authorAlejandro Piñeiro <apinheiro@igalia.com>
Sat, 25 Dec 2010 23:43:02 +0000 (00:43 +0100)
committerAlejandro Piñeiro <apinheiro@igalia.com>
Mon, 27 Dec 2010 15:23:55 +0000 (16:23 +0100)
The watcher doesn't add a window if is a redundant object. This
patch fixes two things:

 * The check was made twice.
 * It uses a check with the string "redundant object", when the
   defined role ATK_ROLE_REDUNDANT_OBJECT is available

modules/other/gail/gailtoplevel.c

index f998a7007af9e4a2798ce04406ffe6708defcb92..83a8583a42c21c1d2ea71e552a26735b4c1f0f96 100644 (file)
@@ -220,13 +220,7 @@ gail_toplevel_show_event_watcher (GSignalInvocationHint *ihint,
     return TRUE;
 
   child = gtk_widget_get_accessible (widget);
-  if (!strcmp (atk_role_get_name (atk_object_get_role (child)), "redundant object"))
-    {
-      return TRUE;
-    }
-
-  child = gtk_widget_get_accessible (widget);
-  if (!strcmp (atk_role_get_name (atk_object_get_role (child)), "redundant object"))
+  if (atk_object_get_role (child) == ATK_ROLE_REDUNDANT_OBJECT)
     {
       return TRUE;
     }